package com.ruoyi.sj.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sj.mapper.FollowMapper;
import com.ruoyi.sj.domain.Follow;
import com.ruoyi.sj.service.IFollowService;
import com.ruoyi.common.support.Convert;

/**
 * 关注 服务层实现
 * 
 * @author tyc@yanyu.com
 * @date 2018-11-28
 */
@Service
public class FollowServiceImpl implements IFollowService 
{
	@Autowired
	private FollowMapper followMapper;

	/**
     * 查询关注信息
     * 
     * @param id 关注ID
     * @return 关注信息
     */
    @Override
	public Follow selectFollowById(Integer id)
	{
	    return followMapper.selectFollowById(id);
	}
	
	/**
     * 查询关注列表
     * 
     * @param follow 关注信息
     * @return 关注集合
     */
	@Override
	public List<Follow> selectFollowList(Follow follow)
	{
	    return followMapper.selectFollowList(follow);
	}
	
    /**
     * 新增关注
     * 
     * @param follow 关注信息
     * @return 结果
     */
	@Override
	public int insertFollow(Follow follow)
	{
	    return followMapper.insertFollow(follow);
	}
	
	/**
     * 修改关注
     * 
     * @param follow 关注信息
     * @return 结果
     */
	@Override
	public int updateFollow(Follow follow)
	{
	    return followMapper.updateFollow(follow);
	}

	/**
     * 删除关注对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteFollowByIds(String ids)
	{
		return followMapper.deleteFollowByIds(Convert.toStrArray(ids));
	}
	
}
